<?php
defined('_JEXEC') or die;
$user = JFactory::getUser();
$mainframe = JFactory::getApplication();
if ($user->guest == 0) {
    ?>
<?php if($this->exercise) {?>
    <div class="categories-exercises-list">
        <div class="infoexercise">
            <p class="wrapper"><label><?php echo JText::_('COM_EXERCISES_EXERCISE_NAME'); ?></label><?php echo $this->exercise->exercise_name ?></p>
            <p class="wrapper"><label><?php echo JText::_('COM_EXERCISES_EXERCISE_TIME_DO'); ?></label><?php echo $this->exercise->during .' '. JText::_('COM_EXERCISES_EXERCISE_TIME_UNIT')?></p>
            <?php if (trim($this->exercise->description) != '') { ?>
                <div class="wrapper"><?php echo $this->exercise->description ?></div>
            <?php } ?>
            <p class="wrapper"><input id="accept_rules" value="1" name="checkrules" type="checkbox" checked="true"><a class="viewrule"  alt="<?php echo COM_EXERCISES_TERM_CONDITIONS;?>" href="javascript:;" title="<?php echo JText::_('COM_EXERCISES_EXERCISE_VIEW_RULES'); ?>"><?php echo JText::_('COM_EXERCISES_EXERCISE_RULES'); ?></a></p>
            <p class="wrapper"><img class="btn_start" src="<?php echo COM_EXERCISES_URL.'assets/images/start2.png'?>"/></p>
        </div>
    </div>
<?php } else { 
     echo JText::_('COM_EXERCISES_IS NOT_HAS_EXERCISE');  
     echo '<p><a href="'.JRoute::_('index.php?option=com_exercises').'">'.JText::_('COM_EXERCISES_RESELECT_A_CATEGORY').'</a></p>';
    }?>
<?php
} else { //is guest 
    $mainframe->redirect(JRoute::_('index.php?option=com_users&view=login'), JText::_('COM_EXERCISES_USER_NOT_LOGIN'));
}?>